html {
  box-sizing: border-box;
  //根元素字体大小；10 / 16 = 62.5%，采用rem单位时，1rem = 10px
  font-size: 62.5%;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
  &:before,
  &:after {
    box-sizing: inherit;
  }
}

$green-primary: #556344;
$green-secondary: #3e4735;
$bg-color: #61755a;
$black-typo: #222;
$white-typo: #f9f9f9;

body {
  width: 100%;
  height: 100vh;
  background-color: $bg-color;
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
}

.bamboo-wrapper {
  width: 100%;
  height: 100%;
  .bamboo-tree {
    height: 100%;
    position: absolute;
    width: 12px;
    background-color: $green-primary;
    box-shadow: inset 1px 1px 7px darken($green-primary, 10);
    .tree-detail {
      position: absolute;
      width: 12px;
      height: 9px;
      border-radius: 50%;
      border-bottom: 3px solid $green-secondary;
    }
    @for $i from 1 through 150 {
      &.tree-#{$i} {
        left: random(96) + 0%;
        transform: skewX(random(20) - 10deg);
        .one {
          top: random(30) + 0%;
        }
        .two {
          top: random(30) + 30%;
        }
        .three {
          top: random(30) + 60%;
        }
      }
    }
  }
}

.wrapper {
  position: fixed;
  bottom: 0;
  height: 255px;
  left: 0;
  right: 0;
  width: 100%;
  &::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 50px;
    bottom: 0;
    background-color: darken($green-primary, 5);
  }
  .typo {
    bottom: 0;
    margin: auto;
    position: relative;
    width: 150px;
    .head-wrapper {
      left: 0;
      position: relative;
      z-index: 3;
      animation: dancing 1s infinite linear;
      .head {
        background-color: $white-typo;
        box-shadow: inset -3px -2px 10px #aaa;
        border-radius: 50%;
        height: 125px;
        width: 150px;
        position: absolute;
        z-index: 3;

        .eye {
          position: absolute;
          background-color: $black-typo;
          border-radius: 50%;
          height: 47px;
          width: 37px;
          top: 22px;
          &::after {
            content: "";
            position: absolute;
            top: 12px;
            width: 10px;
            height: 11px;
            background-color: $white-typo;
            border-radius: 50%;
          }
          &.left {
            left: 28px;
            &::after {
              right: 10px;
            }
            &::before {
              content: "";
              position: absolute;
              border-radius: 50%;
              width: 10px;
              height: 15px;
              left: -5px;
              top: 45px;
              opacity: 0.9;
              background-color: $black-typo;
            }
          }
          &.right {
            right: 28px;
            &::after {
              left: 10px;
            }
          }
        }
        .nose {
          background-color: $black-typo;
          border-radius: 50% 50% 100% 100%;
          position: absolute;
          width: 18px;
          height: 10px;
          top: 75px;
          left: 66px;
        }
        .mouth {
          background: $black-typo;
          border-radius: 50%;
          position: absolute;
          width: 1px;
          height: 5px;
          left: 0;
          right: 0;
          margin: auto;
          bottom: 36px;
          z-index: 2;
          &::before,
          &::after {
            content: "";
            position: absolute;
            border-bottom: 2px solid $black-typo;
            border-radius: 50%;
            margin: auto;
            right: 0;
            top: -21px;
            z-index: 2;
            width: 30px;
            height: 35px;
          }
          &::before {
            left: -1px;
          }
          &::after {
            left: -28px;
          }
        }
      }
      .ear {
        position: absolute;
        top: -15px;
        width: 60px;
        height: 55px;
        background: $black-typo;
        border-radius: 50%;
        &.left {
          left: -12px;
        }
        &.right {
          right: -12px;
        }
      }
    }
    .arm {
      position: absolute;
      background-color: $black-typo;
      border-radius: 30% 30% 45% 45%;
      width: 55px;
      height: 120px;
      top: 95px;
      z-index: 1;
      &.left {
        left: -5px;
        transform: rotate(15deg);
      }
      &.right {
        right: -5px;
        transform: rotate(-15deg);
      }
    }
    .body {
      background-color: $white-typo;
      border-radius: 50%;
      position: absolute;
      left: 20px;
      top: 90px;
      width: 110px;
      height: 125px;
      z-index: 2;
    }
    .leg {
      position: absolute;
      top: 185px;
      width: 120px;
      height: 50px;
      z-index: 1;
      background-color: $black-typo;
      &.left {
        border-radius: 100% 0 0 10%;
        left: -35px;
        &::before {
          left: -4px;
        }
      }
      &.right {
        border-radius: 0 100% 10% 0;
        right: -35px;
        &::before {
          right: -4px;
        }
      }
      &::before {
        content: "";
        position: absolute;
        width: 20px;
        height: 40px;
        background-color: inherit;
        bottom: 0;
        border-radius: 100%;
      }
    }
  }
}

@keyframes dancing {
  0%,
  100% {
    transform: rotate(0);
  }
  50% {
    transform: rotate(5deg);
    left: 5px;
  }
}
